/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2024-05-08     liuchao       the first version
 */
#ifndef DRIVERS_INCLUDE_DRV_SENSOR_H_
#define DRIVERS_INCLUDE_DRV_SENSOR_H_
#include "board.h"
#include "configuration.h"

typedef enum
{
    SENSOR_START = 1,
    // 油压
    SENSOR_OIL_PRESSURE = SENSOR_START,
    // 油缸位移
    SENSOR_PUTTER_DISTANCE,
    // 齿轮位移
    SENSOR_GEAR_DISTANCE,
    // 油温
    SENSOR_OIL_TEMP,
    // 油量
    SENSOR_OIL_VOLUME,
    // 电池电压
    SENSOR_BATTERY,
    // 油压2
    SENSOR_OIL_PRESSURE_2,
    SENSOR_END
} sensor_e;

rt_uint32_t sensor_value(sensor_e sensor);
float sensor_voltage(sensor_e sensor);
void sensor_calibrate(sensor_e sensor);
const char* sensor_name(sensor_e sensor);
float sensor_axial(sensor_e sensor);
float sensor_distance(sensor_e sensor);
float sensor_oil_volume(sensor_e sensor);
configuration_e sensor_to_configuration(sensor_e sensor);

#endif /* DRIVERS_INCLUDE_DRV_SENSOR_H_ */
